package com.security.door.service.Impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.security.door.core.base.BaseService;
import com.security.door.dao.mapper.csCardissueMapper;
import com.security.door.model.domain.csCardissue;
import com.security.door.model.dto.csCardissueDto;
import com.security.door.model.vo.csCardissueVo;
import com.security.door.service.IcsCardissueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class csCardissueServiceImpl extends BaseService<csCardissue> implements IcsCardissueService {

    @Autowired
    csCardissueMapper icsCardissueMapper;

    public PageInfo<csCardissueVo> queryListWithPage(csCardissueDto entity) {
        PageHelper.startPage(entity.getPageIndex(), entity.getPageSize());
        var actionList = icsCardissueMapper.queryListWithPage(entity);
        return new PageInfo<>(actionList);
    }

    @Override
    public Integer deleteByIds(String guids) {
        return icsCardissueMapper.deleteByIds(guids);
    }

    @Override
    public boolean hasIssue(String carno) {
        return icsCardissueMapper.hasIssue(carno) > 0 ? true : false;
    }

}
